/*
 * @Author: 高稀 562949576@qq.com
 * @Date: 2022-05-18 10:35:20
 * @LastEditors: 代琪 1529992814@qq.com
 * @LastEditTime: 2022-08-11 16:32:20
 * @FilePath: /apps-conference-front/Users/gaoxi/Documents/seeyon/ctp-static-portal-front/src/common/componetsMap.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// todo: 需要完善旧栏目与新组件的映射关系
const componentsMap = {
  FooterArea: 'FooterArea',
  //  "loginSection": "loginSection", //登录栏目
  //  LoginDetail: "LoginDetail",
  //  LoginDetailIfra: "LoginDetailIfra",
  loginSection: 'LoginContainer',
  Logo: 'Logo',
  // MagnetGroup: "MagnetGroup",
  News: 'News',
  Notices: 'Notices',
  noticeSection: 'PublicBoard', //公示板
  Tabs: 'Tabs',
  TabPane: 'TabPane',
  ComposeTabs: 'ComposeTabs',
  Nav: 'Nav',
  memorabiliaSection: 'TimeLine', // 大事记
  richMediaSection: 'Vide', //视频
  weatherSection: 'Weather', //天气
  // Slideshow: "Slideshow",
  // ColumnMagnet: "ColumnMagnet",
  shortCutSection: 'Magnet', //磁贴
  SpaceNav: 'SpaceNav',
  bannerImageSection: 'PicBanner', // 图片横幅
  groupBulletinSection: 'Bulletin', // 集团最新公告
  groupTopBulletinSection: 'Bulletin', //集团置顶公告
  singleBoardGroupBulletinSection: 'Bulletin', //集团公告
  groupNewsSection: 'News', // 集团最新新闻
  groupFocusNewsSection: 'News', // 集团焦点新闻
  singleBoardGroupNewsSection: 'News', // "集团板块"
  groupImageNewsSection: 'News', // 集团图片新闻
  banner: 'Banner', //横幅

  // 单位新闻
  singleBoardNewsSection: 'News',
  newsSection: 'News',
  imageNewsSection: 'News',
  focusNewsSection: 'News',

  // 单位公告
  singleBoardBulSection: 'Bulletin',
  bulletinSection: 'Bulletin',
  bulletinTopSection: 'Bulletin',
};

function getComponentName(oldComponentName) {
  // 自定义
  if (oldComponentName && oldComponentName.indexOf('custom_') == 0) {
    return 'AsyncComponent';
  }
  return componentsMap[oldComponentName] || 'AsyncComponent';
}

export default getComponentName;
